package com.pig4cloud.pig.village.fund.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.pig.village.api.entity.Fund;
import com.pig4cloud.pig.village.fund.mapper.FundMapper;
import com.pig4cloud.pig.village.fund.service.IFundService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author limbray.li
 * @date 2021/6/19
 */
@Service
@RequiredArgsConstructor
public class FundServiceImpl extends ServiceImpl<FundMapper, Fund> implements IFundService {
	@Override
	public Fund getFundByCode(String code) {
		LambdaQueryWrapper<Fund> query = Wrappers.lambdaQuery();
		query.eq(Fund::getFundCode,code);
		return super.getOne(query);
	}
}
